//
//  PeopleJobTableViewCell.m
//  SafeFoodManagerDemo
//
//  Created by bob on 2017/10/25.
//  Copyright © 2017年 bob. All rights reserved.
//

#import "PeopleJobTableViewCell.h"

@implementation PeopleJobTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)setIsClick:(BOOL)isClick
{
    _isClick=isClick;
    
    if (self.isClick) {
        self.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
    }else{
        self.accessoryType=UITableViewCellAccessoryNone;
    }
    
}

-(void)setDeleStatue:(BOOL)deleStatue
{
    _deleStatue=deleStatue;
    
    if (deleStatue) {
        
        self.editImageView.hidden=NO;
        
        self.accessoryType=UITableViewCellAccessoryNone;
        
    }else{
        
        self.editImageView.hidden=YES;
        if (self.isClick) {
            self.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
        }else{
            self.accessoryType=UITableViewCellAccessoryNone;
        }
        
    }

}

-(void)setJobModel:(JobData *)JobModel
{
    _JobModel=JobModel;
    
    if (self.isClick) {
        
        //商户本人
        self.JobLabel.text=JobModel.postName==nil?@"":JobModel.postName;
        
        self.CompanyLabel.hidden=YES;
        
        if (JobModel.Seleclt) {
            
             self.editImageView.image=[UIImage imageNamed:@"Select"];
            
        }else{
            
             self.editImageView.image=[UIImage imageNamed:@"UnSelect"];
        }
        
    }else{
        //其他登录角色
        self.JobLabel.text=JobModel.postName==nil?@"":JobModel.postName;
        self.CompanyLabel.text=JobModel.shopName;
        self.CompanyLabel.hidden=NO;
        
    }
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
